package ooday05;
/** 枚举 */
public class EnumDemo {
    public static void main(String[] args) {
        Season[] sea = Season.values();
        for (int i=0;i<sea.length;i++){
            System.out.println(sea[i]);
            System.out.println(sea[i].getA());
            System.out.println(sea[i].getSeasonName());
            System.out.println(sea[i].getSeasonDesc());
        }

        Season se = Season.SPRING;
        switch (se){
            case SPRING:
                System.out.println("天气"+ se.getSeasonDesc()+"钓鱼...");
                break;
            case SUMMER:
                System.out.println("天气"+ se.getSeasonDesc()+"钓大鱼...");
                break;
            case AUTUMN:
                System.out.println("天气"+ se.getSeasonDesc()+"钓金鱼...");
                break;
            case WINTER:
                System.out.println("天气"+ se.getSeasonDesc()+"钓小鱼...");
                break;
        }

        Season s = Season.AUTUMN;
        Season e = Season.SUMMER;
        Season a = Season.SPRING;
        Season o = Season.WINTER;
        System.out.println(s.getSeasonName()+s.getSeasonDesc()+s.getA());
        System.out.println(e.getSeasonName()+e.getSeasonDesc()+e.getA());
        System.out.println(a.getSeasonName()+a.getSeasonDesc()+a.getA());
        System.out.println(o.getSeasonName()+o.getSeasonDesc()+o.getA());
    }
}
